import { ObjKeyValueTransform, getFontValue } from '../utils/util';

export const  hex2OrderMap = {
    "#fff": '00',
    "#ffffff": '00',
    "#000": '01',
    "#000000": '01',
    "#262626": '02',
    "#f5f5f5": '03',
    "#4c4c4c": '04',
    "#444": '05',
    "#666": '06',
    "#999": '07',
    "#ccc": '08',
    "#eee": '09',
    "#f3f3f3": "10",
    "#f00": "11",
    "#f90": "12",
    "#ff0": "13",
    "#0f0": "14",
    "#0ff": "15",
    "#00f": "16",
    "#90f": "17",
    "#f0f": "18",
    "#f4cccc": "19",
    "#fce5cd": "20",
    "#fff2cc": "21",
    "#d9ead3": "22",
    "#d0e0e3": "23",
    "#cfe2f3": "24",
    "#d9d2e9": "25",
    "#ead1dc": "26",
    "#ea9999": "27",
    "#f9cb9c": "28",
    "#ffe599": "29",
    "#b6d7a8": "30",
    "#a2c4c9": "31",
    "#9fc5e8": "32",
    "#b4a7d6": "33",
    "#d5a6bd": "34",
    "#e06666": "35",
    "#f6b26b": "36",
    "#ffd966": "37",
    "#93c47d": "38",
    "#76a5af": "39",
    "#6fa8dc": "40",
    "#8e7cc3": "41",
    "#c27ba0": "42",
    "#c00": "43",
    "#e69138": "44",
    "#f1c232": "45",
    "#6aa84f": "46",
    "#45818e": "47",
    "#3d85c6": "48",
    "#674ea7": "49",
    "#a64d79": "50",
    "#900": "51",
    "#b45f06": "52",
    "#bf9000": "53",
    "#38761d": "54",
    "#134f5c": "55",
    "#0b5394": "56",
    "#351c75": "57",
    "#741b47": "58",
    "#600": "59",
    "#783f04": "60",
    "#7f6000": "61",
    "#274e13": "62",
    "#0c343d": "63",
    "#073763": "64",
    "#20124d": "65",
    "#4c1130": "66",
    "#f2f3f5": "67",
    "#ff9900": "68"
};

export const id2HexMap = {
    "00": "#fff",
    "01": "#000",
    "02": "#262626",
    "03": "#f5f5f5",
    "04": "#4c4c4c",
    "05": "#444",
    "06": "#666",
    "07": "#999",
    "08": "#ccc",
    "09": "#eee",
    "10": "#f3f3f3",
    "11": "#f00",
    "12": "#f90",
    "13": "#ff0",
    "14": "#0f0",
    "15": "#0ff",
    "16": "#00f",
    "17": "#90f",
    "18": "#f0f",
    "19": "#f4cccc",
    "20": "#fce5cd",
    "21": "#fff2cc",
    "22": "#d9ead3",
    "23": "#d0e0e3",
    "24": "#cfe2f3",
    "25": "#d9d2e9",
    "26": "#ead1dc",
    "27": "#ea9999",
    "28": "#f9cb9c",
    "29": "#ffe599",
    "30": "#b6d7a8",
    "31": "#a2c4c9",
    "32": "#9fc5e8",
    "33": "#b4a7d6",
    "34": "#d5a6bd",
    "35": "#e06666",
    "36": "#f6b26b",
    "37": "#ffd966",
    "38": "#93c47d",
    "39": "#76a5af",
    "40": "#6fa8dc",
    "41": "#8e7cc3",
    "42": "#c27ba0",
    "43": "#c00",
    "44": "#e69138",
    "45": "#f1c232",
    "46": "#6aa84f",
    "47": "#45818e",
    "48": "#3d85c6",
    "49": "#674ea7",
    "50": "#a64d79",
    "51": "#900",
    "52": "#b45f06",
    "53": "#bf9000",
    "54": "#38761d",
    "55": "#134f5c",
    "56": "#0b5394",
    "57": "#351c75",
    "58": "#741b47",
    "59": "#600",
    "60": "#783f04",
    "61": "#7f6000",
    "62": "#274e13",
    "63": "#0c343d",
    "64": "#073763",
    "65": "#20124d",
    "66": "#4c1130",
    "67": "#f2f3f5",
    "68": "#ff9900"
};

// https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.indexedcolors?view=openxml-2.8.1
export const excelColorIndexMap = {
    "0": "#000000",
    "1": "#FFFFFF",
    "2": "#FF0000",
    "3": "#00FF00",
    "4": "#0000FF",
    "5": "#FFFF00",
    "6": "#FF00FF",
    "7": "#00FFFF",
    "8": "#000000",
    "9": "#FFFFFF",
    "10": "#FF0000",
    "11": "#00FF00",
    "12": "#0000FF",
    "13": "#FFFF00",
    "14": "#FF00FF",
    "15": "#00FFFF",
    "16": "#800000",
    "17": "#008000",
    "18": "#000080",
    "19": "#808000",
    "20": "#800080",
    "21": "#008080",
    "22": "#C0C0C0",
    "23": "#808080",
    "24": "#9999FF",
    "25": "#993366",
    "26": "#FFFFCC",
    "27": "#CCFFFF",
    "28": "#660066",
    "29": "#FF8080",
    "30": "#0066CC",
    "31": "#CCCCFF",
    "32": "#000080",
    "33": "#FF00FF",
    "34": "#FFFF00",
    "35": "#00FFFF",
    "36": "#800080",
    "37": "#800000",
    "38": "#008080",
    "39": "#0000FF",
    "40": "#00CCFF",
    "41": "#CCFFFF",
    "42": "#CCFFCC",
    "43": "#FFFF99",
    "44": "#99CCFF",
    "45": "#FF99CC",
    "46": "#CC99FF",
    "47": "#FFCC99",
    "48": "#3366FF",
    "49": "#33CCCC",
    "50": "#99CC00",
    "51": "#FFCC00",
    "52": "#FF9900",
    "53": "#FF6600",
    "54": "#666699",
    "55": "#969696",
    "56": "#003366",
    "57": "#339966",
    "58": "#003300",
    "59": "#333300",
    "60": "#993300",
    "61": "#993366",
    "62": "#333399",
    "63": "#333333",
    "64": "",  // system foreground
    "65": ""   // system Background
};

export const lineStyleLuckyToExceljs = {
    0: 'none',
    1: 'thin',
    2: 'hair',
    3: 'dotted',
    4: 'dashed', // 'Dashed',
    5: 'dashDot',
    6: 'dashDotDot',
    7: 'double',
    8: 'medium',
    9: 'mediumDashed',
    10: 'mediumDashDot',
    11: 'mediumDashDotDot',
    12: 'slantDashDot',
    13: 'thick'
};
